fix: resolve ActivityNotFoundException on Android 11 by declaring browser query intents#22
Closed
fix: resolve ActivityNotFoundException on Android 11 by declaring browser query intents#22
Conversation
Co-authored-by: Subterrane <5290140+Subterrane@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [ACT-123] Fix ActivityNotFound exception on Android 11
fix: resolve ActivityNotFoundException on Android 11 by declaring browser query intents
Mar 17, 2026
Subterrane
added a commit
that referenced
this pull request
Mar 17, 2026
…owser query intents Android 11 (API 30) introduced package visibility restrictions that cause PackageManager.queryIntentActivities() to return an empty list unless the app declares <queries> for the intents it needs. AppAuth uses this to discover available browsers, so without the declaration the sign-in flow crashes with ActivityNotFoundException. This adds <queries> for VIEW intents with http/https schemes to the library manifest (automatically merged into consumer apps). Also bumps compileSdkVersion to 30 and AGP to 4.1.3 (both required for <queries> element support), and updates the Gradle wrapper to 6.7.1. Supersedes #22. [no-ado]
4 tasks
Collaborator
|
Thanks for identifying this issue — the root cause diagnosis is correct and However, this PR as written won't have the intended effect because
Additionally, the I've opened PR #24 which addresses the same issue with the necessary build tooling bumps. See that PR for details. |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android 11 (API 30) introduced package visibility restrictions —
PackageManager.queryIntentActivities()returns empty results unless the app explicitly declares the intent filters it needs to query. AppAuth relies on this call to select a browser for the Custom Tabs flow, so without the declaration it finds no browser and throwsActivityNotFoundExceptionat sign-in.Changes
oneloginoidc/src/main/AndroidManifest.xml— Added<queries>block withVIEWintents forhttp/httpsschemes. As the library manifest, this is merged into any consuming app automatically.app/src/main/AndroidManifest.xml/appjava/src/main/AndroidManifest.xml— Same<queries>block added directly to both demo app manifests.<queries>is a visibility declaration only — it grants no additional permissions.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.